/*
extern "C"
{
	#include <lua.h>
	#include <lualib.h>
	#include <lauxlib.h>
}
#include <stdio.h>
#include <string.h>

namespace utillib
{
	namespace script
	{
		class LuaObject
		{
		public:
			LuaObject();
			virtual ~LuaObject();
		private:
			void initialize();
		public:
			bool open( char *filename );
			bool open( char *buffer , char *functionName );
			void close();

			bool setFunction( char *functionName );

			template < class _Ty >
			bool setParam( _Ty param )
			{
				if ( !m_luaState ) return ( false );
				lua_pushnumber( m_luaState, param );

				m_paramCount++;

				return ( true );
			}
			bool setParam( char *param );

			template < class _Ty >
			bool getResult( int index , _Ty &param )
			{
				if ( !m_luaState ) return ( false );
				
				if ( lua_isnumber( m_luaState, index ) )
				{
					param = ( _Ty )lua_tonumber( m_luaState, index );
					return ( true );
				}
				return ( false );
			}

			const char *getResult( int index );
			bool getResult( int index , char *param , int size );

			template < class _Ty >
			bool getValue( char *valueName  , _Ty &value )
			{
				if ( !m_luaState || !valueName ) return ( false );
				
				lua_pushstring( m_luaState, valueName );
				lua_rawget( m_luaState, LUA_GLOBALSINDEX );

				if ( lua_isnumber( m_luaState, -1 ) )
				{
					value = ( _Ty )lua_tonumber( m_luaState, -1 );
					return ( true );
				}
				return ( false );
			}

			bool getValue( char *valueName , char *value , int size );
			const char *getValue( char *valueName );

			bool execute( int resultCount = 1 );
		private:
			lua_State *m_luaState;
			int m_paramCount;
		};
	};
};
*/